<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script type="text/javascript">
    function year(){
        var result="";
        var y=document.getElementById("year").value;
        if((y%10==0&&y%400==0)||(y%10!=0&&y%4==0)){
            result=y+"年是闰年<a href='LeapYear.html'>重新输入</a>";
        }
        else{
            result=y+"年是不闰年<a href='LeapYear.html'>重新输入</a>";
        }
        document.write(result);
    }
    </script>
</head>
<body>
    <div>
        请输入需要判断闰年的年份：
    </div>
    <input type="text"  id="year">
    <input type="button" value="计算" onclick="year()">
</body>
</html>